import java.util.Scanner;
//快速排序
public class 快速排序模版 {
    private static int N = 1000000 + 10;
    private static int n;
    private static int[] q = new int[N];

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        n = scan.nextInt();
        for (int i = 0; i < n; i++) {
            q[i] = scan.nextInt();
        }
        quickSort(0, n - 1);
        for (int i = 0; i < n; i++) {
            System.out.print(q[i]+" ");
        }
    }

    private static void quickSort(int l, int r) {
        if (l >= r) return;
        int x = q[l], i = l - 1, j = r + 1;
        while (i < j) {
            do i++; while (q[i] < x);
            do j--; while (q[j] > x);
            if (i < j) {
                int temp = q[i];
                q[i] = q[j];
                q[j] = temp;
            }
        }
        quickSort(l,j);
        quickSort(j+1,r);
    }
}
